﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Data.SqlClient;


using Model;
using ExamOnLine.Managers;

public partial class dbManagerTest : System.Web.UI.Page
{
    private DBManagerFactory dbManagerFactory;

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void TestDBManager(object sender, EventArgs e)
    {
        dbManagerFactory = DBManagerFactory.getInstance();
       
        string message = "";

        string sqlstring = "select * from t_student";

        SqlDataReader dr = dbManagerFactory.createSqlDataReader(sqlstring);

        testdb.DataSource = dr;
        testdb.DataTextField = "id";
        testdb.DataValueField = "stuId";
        testdb.DataBind();

        dbManagerFactory.closeConnection();
           
        
        msg.Text = message;
    }
}
